//
//  UIButton+Extension.swift
//  0319iOSweiboDemo
//
//  Created by Tang on 16/3/25.
//  Copyright © 2016年 大天朝. All rights reserved.
//

import UIKit


extension UIButton {
    convenience init(title: String, imageName: String, bkgImageName: String, textColor: UIColor, textFoun: CGFloat) {
       self.init()
            self.setBackgroundImage(UIImage(named: bkgImageName), forState: UIControlState.Normal)
            self.setBackgroundImage(UIImage(named: "\(bkgImageName)_highlighted"), forState: UIControlState.Highlighted)
            self.setImage(UIImage(named: imageName), forState: UIControlState.Normal)
            self.setTitle(title, forState: UIControlState.Normal)
            self.setTitleColor(textColor, forState: UIControlState.Normal)
            self.titleLabel?.font = UIFont.systemFontOfSize(textFoun)
    }
}
//    private lazy var forwardButton: UIButton = {
//       let button = UIButton()
//        button.setBackgroundImage(UIImage(named: "timeline_card_bottom_background"), forState: UIControlState.Normal)
//        button.setBackgroundImage(UIImage(named: "timeline_card_bottom_background_highlighted"), forState: UIControlState.Highlighted)
//        button.setImage(UIImage(named: "timeline_icon_retweet"), forState: UIControlState.Normal)
//        button.setTitle("转发", forState: UIControlState.Normal)
//        button.setTitleColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
//        button.titleLabel?.font = UIFont.systemFontOfSize(11)
//        return button
//    }()